package com.youxin.cpcenter.model;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.youxin.foundation.utils.DataUtils;

public class TbEntLeadsStat {
    /** 企业认证id */
	@JsonIgnore
    private Long id;

    /** 企业UID */
    @JsonIgnore
    private String companyUid;

    /** 企业名称 */
    @JsonIgnore
    private String companyName;

    /** 未跟进线索数量 */
    private Integer unfollow;

    /** 跟进线索数量 */
    private Integer follow;

    /** 有意向线索跟进数量 */
    @JsonProperty("have_intention")
    private Integer haveIntention;

    /** 已成交 */
    @JsonProperty("deal_done")
    private Integer dealDone;
    
    @JsonProperty("total")
    private int getTotal()
    {
    	return DataUtils.getInt(unfollow)+DataUtils.getInt(follow)+DataUtils.getInt(haveIntention)
    	+DataUtils.getInt(dealDone);
    }

    /** 开始时间 */
    @JsonIgnore
    private Date addTime;

    /** 修改时间 */
    @JsonIgnore
    private Date updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCompanyUid() {
        return companyUid;
    }

    public void setCompanyUid(String companyUid) {
        this.companyUid = companyUid == null ? null : companyUid.trim();
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName == null ? null : companyName.trim();
    }

    public Integer getUnfollow() {
    	if(unfollow==null){
    		return 0;
    	}
        return unfollow;
    }

    public void setUnfollow(Integer unfollow) {
        this.unfollow = unfollow;
    }

    public Integer getFollow() {
    	if(follow==null){
    		return 0;
    	}
        return follow;
    }

    public void setFollow(Integer follow) {
        this.follow = follow;
    }

    public Integer getHaveIntention() {
    	if(haveIntention==null){
    		return 0;
    	}
        return haveIntention;
    }

    public void setHaveIntention(Integer haveIntention) {
        this.haveIntention = haveIntention;
    }

    public Integer getDealDone() {
    	if(dealDone==null){
    		return 0;
    	}
        return dealDone;
    }

    public void setDealDone(Integer dealDone) {
        this.dealDone = dealDone;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}